<?php

namespace Core\Base;

/**
 * Description of Table
 *
 * @author Admin
 */
class Table
{
	/**
	 *
	 * @var \DbSimple_Connect
	 */
	protected $_db;


	public function __construct()
	{
		$this->_db = \App::db();
		
		if(!$this->_db)
			throw new \Core\Exception('DB is not set');
	}
	
	public function getUrl($row)
	{
		if(isset($row['id']) && isset($row['title']))
			return $row['id'] .'-'. \Core\String::translit($row['title']);
			
		return $row['id'] .'-';
	}
	
}
